package com.lagou.mall.esflow.server.util;

import com.lagou.mall.esflow.client.Binlog;
import com.lagou.mall.esflow.server.provider.FilterOperatorData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class FilterEnvUtils {

    private static FilterOperatorData filterOperatorData;

    @Autowired
    public void setFilterOperatorData(FilterOperatorData filterOperatorData) {
        FilterEnvUtils.filterOperatorData = filterOperatorData;
    }

    public static boolean filter(Binlog binlog) {
        return filterOperatorData.filter(binlog);
    }

}
